home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / concatdemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  429 b   |  18 lines

  1. program ConcatDemo (Input, Output);
  2.  
  3. var
  4.   Ch   : Char;
  5.   Str  : String (100);
  6.   Str2 : String (50);
  7.   FStr : packed array [1 .. 20] of Char;
  8.  
  9. begin
  10.    Ch := '$';
  11.    FStr := 'demo';  { padded with blanks }
  12.    Write ('Give me some chars to play with: ');
  13.    ReadLn (Str);
  14.    Str := '^' + 'prefix:' + Str + ':suffix:' + FStr + Ch;
  15.    WriteLn (Concat ('Le', 'ng', 'th'), ' = ', Length (Str));
  16.    WriteLn (Str)
  17. end.
  18.